﻿#pragma once

#include "Ability/EditorAbilityModel.h"
#include "EditorMaterialPreviewAbilityModel.m.h"

class RMaterial;

RCLASS(ExtraHeader= "Material/Material.h")
class REditorMaterialPreviewAbilityModel : public REditorAbilityModel
{
    ROBJECT

public:

    void FirstTimeInitializeObject() override;  

    RFUNCTION()
    void OnFocusedObjectChanged(TSharedObjectPtr<RObject> InObject);


    virtual CString GetName() const override { return U"材质预览"; }

    TSharedObjectPtr<RMaterial> GetMaterial() const { return Material; }
    TDelegate<void> OnMaterialChanged;
protected:
    RFIELD()
    TSharedObjectPtr<RMaterial> Material;
};